<template>
  <div style="margin-left: 20px">
    <p><label>范围</label></p>
    <p><el-input-number v-model="num_min" @change="handleChange" :min="1" ></el-input-number></p>
    <p><el-input-number v-model="num_max" @change="handleChange" :min="2"></el-input-number></p>
    <el-button type="danger" @click="chou" round> 我的回合：抽卡！ </el-button>
  </div>

</template>

<script>
export default {
  name:'choujiang',
  data() {

    return {
      num_min: 1,
      num_max: 50,
      num:0,
    };
  },

  methods: {
    handleChange(value, direction, movedKeys) {
      console.log(value, direction, movedKeys);
    },
    chou (){
      this.num = Math.floor(Math.random() * (this.num_max - this.num_min + 1)) + this.num_min
      this.$notify({
        title: '中奖了！',
        message: '编号为'+this.num,
        type: 'success'
      })
    }
  }
};
</script>

<style scoped>

</style>
